<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <link rel="stylesheet" type="text/css" href="__PUBLIC__/lib/bootstrap/css/bootstrap.min.css"/>
	    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/base.css"/>
	    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css"/>
		<script type="text/javascript" src="__PUBLIC__/lib/bootstrap/js/jquery.min.js" ></script>
		<script type="text/javascript" src="__PUBLIC__/lib/bootstrap/js/bootstrap.min.js" ></script>
		<script type="text/javascript" src="__PUBLIC__/js/shacha.js" ></script>
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/markdown/bootstrap-markdown.min.css" />
		<link href="__PUBLIC__/css/sweetalert/sweetalert.css" rel="stylesheet">
	</head>
	<body style="background:transparent;">
			   
				<div class="pad-20">
					<div class="panel panel-default linear">
					  	<div class="panel-heading">新闻管理</div>
					  	<div class="panel-body">
				    		<form class="form-horizontal m-t" id="commentForm" onsubmit="return checksubmit();">
							<div class="form-group">
                                <label class="col-sm-1 control-label">标题：</label>
                                <div class="col-sm-6">
                                    <input id="title" type="text" class="form-control" maxlength="40" name="title" value="{$news['title']}" required="" aria-required="true">
									<input type="hidden" name="hid" value="{$news['id']}">
                                </div>
                            </div>
							<div class="form-group">
                                <label class="col-sm-1 control-label">内容：</label>
                                <div class="col-sm-12">
                                    <div class="ibox-content">
										<textarea name="content" data-provide="markdown" rows="10">{$news['content']}</textarea>
									</div>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-1">
                                    <button class="btn btn-primary" type="submit">提交</button>
                                </div>
                            </div>
                        </form>
					  	</div>
			
					</div>
					
				</div>
				
			</div>
		</div>
	</body>
</html>

<script type="text/javascript" src="__PUBLIC__/js/markdown/markdown.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/markdown/to-markdown.js"></script>
 <script type="text/javascript" src="__PUBLIC__/js/markdown/bootstrap-markdown.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/markdown/bootstrap-markdown.zh.js"></script>
	
<script src="__PUBLIC__/js/sweetalert/sweetalert.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/bootstrap/js/jquery.min.js" ></script>
<script type="text/javascript" src="__PUBLIC__/lib/bootstrap/js/bootstrap.min.js" ></script>
<script type="text/javascript" src="__PUBLIC__/js/shacha.js" ></script>
	<script>
	
	function checksubmit() {
		var formParam = $("#commentForm").serialize();//序列化表格内容为字符串
		//var formParam = new FormData($('#commentForm')[0]);//序列化表格内容为字符串
		/* return false; */
		$.ajax({
			type:'post',      
			url:'/Admin/Index/newsxg',
			data:formParam,  
			cache:false,
			dataType:'json',  
			/*processData: false,  
            contentType: false,*/
			success:function(data){
				//alert(data.message);
				if (data.message == '修改成功') {
					swal("修改成功", "", "success");
					
				} else {
					swal("修改失败", "", "error");
				} 
			}
		});
		return false;
	}
	
	</script>
